'use strict';

const Protocol = require('./protocol');

// 55 AA 01 07 00 05 01 05 00 01 01 14
// 55AA01070005010500010114

// 4c5332563439303330340d0a

// 55AA0107000804020004000000011A


// 55 AA 01 01 00 0B 28 FF 9B 10 01 15 02 B3 31 2E 30 38
const p = Protocol.fromHex('55AA00070005010500010113');

const p2 = Protocol.fromRaw({
  id: 1,
  dataType: 5,
  mode: 7,
  dataLength: 1,
  data: '01',
});

console.log(p.toHex(), p.toHex() === p2.toHex());
